<?php
session_start();
include"functions.php";
include"$config";
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>INDEX</title>
</head>
<body>
<?php 

$sql="select * from users,artical where artical.u_id = users.u_id ORDER BY art_id DESC ";
$get_data=mysql_query($sql);
if($get_data){
while($result=mysql_fetch_array($get_data)){
 $art_id=$result['art_id'];
 $u_name=$result['username'];
 $art_title=$result['title'];
 $artical=$result['artical'];
 echo $u_name ."<br />"."<a href='artical.php?artical=$art_id' name='$art_id'>$art_title</a>"."<br />".$artical."<br /><br />";
 }
mysql_close($connection);
}
// user.username,artical.title,artical.message
//<input type='submit' name='artical' value='$art_id'>$art_title
//<a href='artical.php?artical=$art_id' name='$art_id'>$art_title</a><input type='hidden' name='$art_id'>
//"<form name='post' action='artical.php' method='post'><input type='submit' name='$art_id' value='$art_id'>$art_title</form>"
?>
</body>
</html>